package com.njwt.cloud.msconsumer.service;

import com.njwt.cloud.mscommon.pojo.OrderModel;
import com.njwt.cloud.msconsumer.service.hystrix.FeignOrderServiceFailure;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author <a href="mailto:xingxiao@gtmap.cn">xingxiaofeng</a>
 * @version2.1 2022-04-11
 * @description
 */
@FeignClient(value = "orders-provider", fallback = FeignOrderServiceFailure.class)
public interface OrderService {
    @RequestMapping(value = "/order/getOrder")
    OrderModel getOrder();

    @GetMapping("/order/getOrderById")
    OrderModel getOrderById(@RequestParam("orderid") String orderid);

    @GetMapping("/order/getOrderList")
    List<OrderModel> getOrderList(@RequestBody OrderModel orderModel);
}
